package org.jeecg.modules.charge.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.entity.charge.ChargeBills;
import org.jeecg.entity.charge.ChargeInvoiceRequest;
import org.jeecg.modules.charge.entity.BwInvoiceEntity.BlueInvoiceDetailed;
import org.jeecg.modules.charge.entity.ChargeBillsOrder;
import org.jeecg.modules.charge.entity.VoucherInvoiceOffline;
import org.jeecg.modules.charge.mapper.ChargeInvoiceRequestMapper;
import org.jeecg.modules.charge.service.IChargeInvoiceRequestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 发票记录
 * @Author: jeecg-boot
 * @Date:   2019-08-15
 * @Version: V1.0
 */
@Service
public class ChargeInvoiceRequestServiceImpl extends ServiceImpl<ChargeInvoiceRequestMapper,ChargeInvoiceRequest> implements IChargeInvoiceRequestService {
    @Autowired
    private ChargeInvoiceRequestMapper chargeInvoiceRequestMapper;

    @Override
    public List<org.jeecg.entity.charge.ChargeInvoiceRequest> listBySn(String sn) {
        return chargeInvoiceRequestMapper.listBySn(sn);
    }

    @Override
    public List<ChargeInvoiceRequest> getFpqqlsh() {
        return chargeInvoiceRequestMapper.getFpqqlsh();
    }

    @Override
    public String getOidByRid(String roomid, String type) {
        return chargeInvoiceRequestMapper.getOidByRid(roomid,type);
    }

    @Override
    public org.jeecg.entity.charge.ChargeInvoiceRequest getDetailByLsh(String fpqqlsh) {
        return chargeInvoiceRequestMapper.getDetailByLsh(fpqqlsh);
    }

    @Override
    public String selectByOrderNum(String ordernum) {
        return chargeInvoiceRequestMapper.selectByOrderNum(ordernum);
    }

    @Override
    public void updatefail(String detail, String fpqqlsh) {
        chargeInvoiceRequestMapper.updatefail(detail,fpqqlsh);
    }

    @Override
    public org.jeecg.entity.charge.ChargeInvoiceRequest getHisMakeInvoiceInfo(String roomid) {
        return chargeInvoiceRequestMapper.getHisMakeInvoiceInfo(roomid);
    }

    @Override
    public String getPayLastBills(String roomid) {
        return chargeInvoiceRequestMapper.getPayLastBills(roomid);
    }

    @Override
    public org.jeecg.entity.charge.ChargeInvoiceRequest getInfoByOrder(String ordernum) {
        return chargeInvoiceRequestMapper.getInfoByOrder(ordernum);
    }

    @Override
    public List<String> getRoomIdsByUid(String uid) {
        return chargeInvoiceRequestMapper.getRoomIdsByUid(uid);
    }

    @Override
    public List<org.jeecg.entity.charge.ChargeInvoiceRequest> getDetailsByRids(List<String> roomids) {
        return chargeInvoiceRequestMapper.getDetailsByRids(roomids);
    }

    @Override
    public String getPdfByhm(String fphm, String fpdm) {
        return chargeInvoiceRequestMapper.getPdfByhm(fphm,fpdm);
    }

    @Override
    public Integer updateResByfplsh(String fpqqlsh, String res) {
        return chargeInvoiceRequestMapper.updateResByfplsh(fpqqlsh,res);
    }

    @Override
    public List<ChargeInvoiceRequest> getDetailsSelStatus(String dateStr) {
        return chargeInvoiceRequestMapper.getDetailsSelStatus(dateStr);
    }

    @Override
    public Integer deleteDetailByLsh(String fpqqlsh) {
        return chargeInvoiceRequestMapper.deleteDetailByLsh(fpqqlsh);
    }

    @Override
    public List<ChargeBills> getBillsByRoomId(String roomId) {
        return chargeInvoiceRequestMapper.getBillsByRoomId(roomId);
    }

    @Override
    public String getComNameById(String comId) {
        return chargeInvoiceRequestMapper.getComNameById(comId);
    }

    @Override
    public String getVouItemByPid(String pId) {
        return chargeInvoiceRequestMapper.getVouItemByPid(pId);
    }

    @Override
    public String getLastPayCnyByRoomId(String roomId) {
        return chargeInvoiceRequestMapper.getLastPayCnyByRoomId(roomId);
    }

    @Override
    public List<VoucherInvoiceOffline> getDetailsNoVouRecordByDate(String kprqFrom, String kprqTo) {
        return chargeInvoiceRequestMapper.getDetailsNoVouRecordByDate(kprqFrom, kprqTo);
    }

    @Override
    public void updateVoucherHeadId(ChargeInvoiceRequest invoice) {
        chargeInvoiceRequestMapper.updateVoucherHeadId(invoice);
    }

    @Override
    public String getVoucherItemByPidRid(String pid, String rid) {
        return chargeInvoiceRequestMapper.getVoucherItemByPidRid(pid, rid);
    }

    @Override
    public String getVoucherItemByPidCid(String pid, String cid) {
        return chargeInvoiceRequestMapper.getVoucherItemByPidCid(pid, cid);
    }

    @Override
    public String getRoomProperty(String rid) {
        return chargeInvoiceRequestMapper.getRoomProperty(rid);
    }

    @Override
    public String getRoomPeopertyByCid(String cid) {
        return chargeInvoiceRequestMapper.getRoomPeopertyByCid(cid);
    }

    @Override
    public List<ChargeBills> getBillsByRoomIdType(String roomId, String type) {
        return chargeInvoiceRequestMapper.getBillsByRoomIdType(roomId, type);
    }

    @Override
    public List<ChargeBillsOrder> getOrders() {
        return chargeInvoiceRequestMapper.getOrders();
    }

    @Override
    public String getSubCodeByMethod(String method) {
        return chargeInvoiceRequestMapper.getSubCodeByMethod(method);
    }

    @Override
    public Integer updateBillsByIds(List<String> billIds, String skrq, String method) {
        return chargeInvoiceRequestMapper.updateBillsByIds(billIds, skrq, method);
    }


    public  Integer addRequestInfo(BlueInvoiceDetailed detail) {
        Integer result=chargeInvoiceRequestMapper.addRequestInfo(detail);
        return result;
    }

    public List<BlueInvoiceDetailed> getInvoiceRequestInfo(String invoiceReqId){
        return chargeInvoiceRequestMapper.getInvoiceRequestInfo(invoiceReqId);
    }

    @Override
    public ChargeInvoiceRequest getInfoByFpqqlsh(String fpqqlsh) {
        return chargeInvoiceRequestMapper.getInfoByFpqqlsh(fpqqlsh);
    }

    @Override
    public List<ChargeInvoiceRequest> findPage(Page<ChargeInvoiceRequest> page, ChargeInvoiceRequest invoiceRequest){
        return chargeInvoiceRequestMapper.findPage(page, invoiceRequest);
    }

}
